<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Events, type definitions and API calls.</title>
<link href="tabs.css" rel="stylesheet" type="text/css" />
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="alias.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="alias.js"></script>

<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>


<script type="text/javascript">
  jQuery(document).ready(function () {
    if(gref){ // Number all _img and _table classes
      gref();
    }
  });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->

<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">nRF51822 BLE SDK
   
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('group__ble__api.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Events, type definitions and API calls.</div>  </div>
<div class="ingroups"><a class="el" href="group___b_l_e___c_o_m_m_o_n.html">Definitions common to all S110 Softdevice modules.</a></div></div>
<div class="contents">

<p>Module independent events, type definitions and API calls for the S110 Softdevice.  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structble__evt__tx__complete__t.html">ble_evt_tx_complete_t</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">TX complete event.  <a href="structble__evt__tx__complete__t.html#details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structble__common__evt__t.html">ble_common_evt_t</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Event structure for events not associated with a specific function module.  <a href="structble__common__evt__t.html#details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structble__evt__hdr__t.html">ble_evt_hdr_t</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">BLE Event header.  <a href="structble__evt__hdr__t.html#details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structble__evt__t.html">ble_evt_t</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Common BLE Event type, wrapping the module specific event reports.  <a href="structble__evt__t.html#details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structble__version__t.html">ble_version_t</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Version Information.  <a href="structble__version__t.html#details">More...</a><br/></td></tr>
<tr><td colspan="2"><h2><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <a class="el" href="group__ble__api.html#gga726ca809ffd3d67ab4b8476646f26635a1c413c45622ed9c39d9e493bdcb7433b">SVC_BLE_EVT_GET</a> =  BLE_SVC_BASE, 
<a class="el" href="group__ble__api.html#gga726ca809ffd3d67ab4b8476646f26635a66d2a4f6f7cbd2d514a2a2b65f466b2b">SVC_BLE_TX_BUFFER_COUNT_GET</a>, 
<a class="el" href="group__ble__api.html#gga726ca809ffd3d67ab4b8476646f26635ae38be60149b831cf8de3d4977529f3fe">SVC_BLE_VS_UUIDS_ASSIGN</a>, 
<a class="el" href="group__ble__api.html#gga726ca809ffd3d67ab4b8476646f26635afbf80f58c266ff61f94c75d647b33f92">SVC_BLE_VERSION_GET</a>
 }</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Common API SVC numbers.  <a href="group__ble__api.html#ga726ca809ffd3d67ab4b8476646f26635">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <a class="el" href="group__ble__api.html#gga0411cd49bb5b71852cecd93bcbf0ca2da408a77f131a2d314fbf477cdb2d1e0f6">BLE_EVT_TX_COMPLETE</a> =  BLE_EVT_BASE
 }</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">BLE Module Independent Event IDs.  <a href="group__ble__api.html#ga0411cd49bb5b71852cecd93bcbf0ca2d">More...</a><br/></td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__api.html#gab96bbfd85c2ab36e6cec85ef0e29de26">ble_evt_get</a> (uint8_t *p_dest, uint16_t *p_len)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get an event from the pending events queue.  <a href="#gab96bbfd85c2ab36e6cec85ef0e29de26"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__api.html#ga278e97b31059a569c22bb21a5fcba1b5">ble_tx_buffer_count_get</a> (uint8_t *p_count)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the total number of available transmission buffers available in BLE stack.  <a href="#ga278e97b31059a569c22bb21a5fcba1b5"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__api.html#ga6266a237491ab1aab2b0c2d8881ad775">ble_vs_uuids_assign</a> (uint16_t vs_uuid_count, <a class="el" href="structble__uuid128__t.html">ble_uuid128_t</a> const *const p_vs_uuids)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Assign Vendor Specific UUIDs.  <a href="#ga6266a237491ab1aab2b0c2d8881ad775"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__api.html#gaff54ebdd02eb13571d4c1f316cbbfd3f">ble_version_get</a> (<a class="el" href="structble__version__t.html">ble_version_t</a> *p_version)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get Version Information.  <a href="#gaff54ebdd02eb13571d4c1f316cbbfd3f"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<p>Module independent events, type definitions and API calls for the S110 Softdevice. </p>
<hr/><h2>Enumeration Type Documentation</h2>
<a class="anchor" id="ga726ca809ffd3d67ab4b8476646f26635"></a><!-- doxytag: member="ble.h::@6" ref="ga726ca809ffd3d67ab4b8476646f26635" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">anonymous enum</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Common API SVC numbers. </p>
<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" id="gga726ca809ffd3d67ab4b8476646f26635a1c413c45622ed9c39d9e493bdcb7433b"></a><!-- doxytag: member="SVC_BLE_EVT_GET" ref="gga726ca809ffd3d67ab4b8476646f26635a1c413c45622ed9c39d9e493bdcb7433b" args="" -->SVC_BLE_EVT_GET</em>&nbsp;</td><td>
<p>Get an event from the pending events queue. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="gga726ca809ffd3d67ab4b8476646f26635a66d2a4f6f7cbd2d514a2a2b65f466b2b"></a><!-- doxytag: member="SVC_BLE_TX_BUFFER_COUNT_GET" ref="gga726ca809ffd3d67ab4b8476646f26635a66d2a4f6f7cbd2d514a2a2b65f466b2b" args="" -->SVC_BLE_TX_BUFFER_COUNT_GET</em>&nbsp;</td><td>
<p>Get the total number of available transmission buffers from the stack. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="gga726ca809ffd3d67ab4b8476646f26635ae38be60149b831cf8de3d4977529f3fe"></a><!-- doxytag: member="SVC_BLE_VS_UUIDS_ASSIGN" ref="gga726ca809ffd3d67ab4b8476646f26635ae38be60149b831cf8de3d4977529f3fe" args="" -->SVC_BLE_VS_UUIDS_ASSIGN</em>&nbsp;</td><td>
<p>Assign Vendor Specific UUIDs. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="gga726ca809ffd3d67ab4b8476646f26635afbf80f58c266ff61f94c75d647b33f92"></a><!-- doxytag: member="SVC_BLE_VERSION_GET" ref="gga726ca809ffd3d67ab4b8476646f26635afbf80f58c266ff61f94c75d647b33f92" args="" -->SVC_BLE_VERSION_GET</em>&nbsp;</td><td>
<p>Get the local version information (company id, LMP Version, LMP Subversion) </p>
</td></tr>
</table>
</dd>
</dl>

<p>Definition at line <a class="el" href="ble_8h_source.html#l00031">31</a> of file <a class="el" href="ble_8h_source.html">ble.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga0411cd49bb5b71852cecd93bcbf0ca2d"></a><!-- doxytag: member="ble.h::@7" ref="ga0411cd49bb5b71852cecd93bcbf0ca2d" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">anonymous enum</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>BLE Module Independent Event IDs. </p>
<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" id="gga0411cd49bb5b71852cecd93bcbf0ca2da408a77f131a2d314fbf477cdb2d1e0f6"></a><!-- doxytag: member="BLE_EVT_TX_COMPLETE" ref="gga0411cd49bb5b71852cecd93bcbf0ca2da408a77f131a2d314fbf477cdb2d1e0f6" args="" -->BLE_EVT_TX_COMPLETE</em>&nbsp;</td><td>
<p>Transmission Complete. </p>
</td></tr>
</table>
</dd>
</dl>

<p>Definition at line <a class="el" href="ble_8h_source.html#l00043">43</a> of file <a class="el" href="ble_8h_source.html">ble.h</a>.</p>

</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="gab96bbfd85c2ab36e6cec85ef0e29de26"></a><!-- doxytag: member="ble.h::ble_evt_get" ref="gab96bbfd85c2ab36e6cec85ef0e29de26" args="(uint8_t *p_dest, uint16_t *p_len)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t ble_evt_get </td>
          <td>(</td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>p_dest</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t *&#160;</td>
          <td class="paramname"><em>p_len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get an event from the pending events queue. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">p_dest</td><td>Pointer to buffer to be filled in with an event </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">p_len</td><td>Pointer the length of the buffer, on return it is filled with the event length</td></tr>
  </table>
  </dd>
</dl>
<p>This call allows the application to pull a BLE event from the queue.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>NRF_SUCCESS If an event has been pulled. </dd>
<dd>
NRF_ERROR_NOT_FOUND If no events are ready to be pulled. </dd>
<dd>
NRF_ERROR_DATA_SIZE If no event could be stored in the application provided buffer </dd></dl>

</div>
</div>
<a class="anchor" id="ga278e97b31059a569c22bb21a5fcba1b5"></a><!-- doxytag: member="ble.h::ble_tx_buffer_count_get" ref="ga278e97b31059a569c22bb21a5fcba1b5" args="(uint8_t *p_count)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t ble_tx_buffer_count_get </td>
          <td>(</td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>p_count</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the total number of available transmission buffers available in BLE stack. </p>
<p>This call allows the application to obtain the total number of transmission buffers available for application data. Please note that this does not give the number of free buffers, but rather the total amount of them.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">p_count</td><td>Pointer to a unit8_t which will contain the number of buffers upon successful return.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>NRF_SUCCESS If the number of buffers has been returned successfully. </dd></dl>

</div>
</div>
<a class="anchor" id="ga6266a237491ab1aab2b0c2d8881ad775"></a><!-- doxytag: member="ble.h::ble_vs_uuids_assign" ref="ga6266a237491ab1aab2b0c2d8881ad775" args="(uint16_t vs_uuid_count, ble_uuid128_t const *const p_vs_uuids)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t ble_vs_uuids_assign </td>
          <td>(</td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>vs_uuid_count</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structble__uuid128__t.html">ble_uuid128_t</a> const *const&#160;</td>
          <td class="paramname"><em>p_vs_uuids</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Assign Vendor Specific UUIDs. </p>
<p>This call allows the application to assign a set of vendor specific UUIDs with the BLE stack, for later use in both GAP, GATTC and GATTS.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">vs_uuid_count</td><td>Number of 16-octet (128-bit) Vendor Specific UUIDs supplied in the call. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">p_vs_uuids</td><td>Pointer to array of 16-octet (128-bit) little endian Vendor Specific UUIDs.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>NRF_SUCCESS If the number of uuid's have been stored correctly </dd>
<dd>
NRF_ERROR_NO_MEM If the size exceeds the number of free slots for VS uuid's </dd>
<dd>
NRF_ERROR_INVALID_PARAM If the size of vs_uuid_count is 0 </dd>
<dd>
NRF_ERROR_INVALID_ADDR if p_vs_uuids is NULL </dd></dl>

</div>
</div>
<a class="anchor" id="gaff54ebdd02eb13571d4c1f316cbbfd3f"></a><!-- doxytag: member="ble.h::ble_version_get" ref="gaff54ebdd02eb13571d4c1f316cbbfd3f" args="(ble_version_t *p_version)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t ble_version_get </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structble__version__t.html">ble_version_t</a> *&#160;</td>
          <td class="paramname"><em>p_version</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get Version Information. </p>
<p>This call allows the application to get version information of BLE Stack.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">p_version</td><td>Pointer to <a class="el" href="structble__version__t.html" title="Version Information.">ble_version_t</a> structure to be filled in.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>NRF_SUCCESS Always returns the version information. </dd></dl>

</div>
</div>
</div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>


    <li class="footer">
      Copyright &copy 2006-2011 <a href="http://www.nordicsemi.no" style="text-decoration:none">Nordic Semiconductor</a>.
      All Rights Reserved.
      <a href="disclaimer.html">Disclaimer</a>
    </li>
   </ul>
 </div>


</body>
</html>
